package com.girls.dao;

import com.girls.model.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface EmployeeDaoAnnotation {
    @Select("select * from t_employee where id = #{id}")
    public Employee getEmployeeByID(Integer id);
    @Update(" UPDATE t_employee\n" +
            "        SET empName=#{empName},gender=#{gender},email=#{email}\n" +
            "        WHERE id=#{id}")
    public int updateEmployee(Employee employee);
    @Delete("DELETE FROM t_employee WHERE id=#{id}")
    public boolean deleteEmployee(Integer id);
    @Insert("INSERT INTO t_employee(empname,gender,email) VALUES(#{empName},#{gender},#{email})")
    public int insertEmployee(Employee employee);
}
